package com.cat.model.memcache;

import com.alonew.memcache.util.IMemKey;
import com.alonew.memcache.util.MemConst;
import com.alonew.memcache.util.MemInfo;

public enum SpringdemoMemKey implements IMemKey {

	test("test_", MemConst.minute * 10),// 登入验证
	;

	final String preKey() {
		return "springdemo_";
	}

	private String key;
	private int time;

	SpringdemoMemKey(String key, int time) {
		this.key = key;
		this.time = time;
	}

	@Override
	public String getKey() {
		return preKey() + key;
	}

	@Override
	public int getTime() {
		return time;
	}

	@Override
	public MemInfo<SpringdemoMemKey> build(Object ext) {
		return MemInfo.build(this, ext);
	}

}
